import request from '@/utils/request'

// 查询博客每日图片列表
export function listDailyImage(query) {
  return request({
    url: '/blog/dailyImage/list',
    method: 'get',
    params: query
  })
}

// 查询博客每日图片详细
export function getDailyImage(id) {
  return request({
    url: '/blog/dailyImage/' + id,
    method: 'get'
  })
}

// 新增博客每日图片
export function addDailyImage(data) {
  return request({
    url: '/blog/dailyImage',
    method: 'post',
    data: data
  })
}

// 修改博客每日图片
export function updateDailyImage(data) {
  return request({
    url: '/blog/dailyImage',
    method: 'put',
    data: data
  })
}

// 删除博客每日图片
export function delDailyImage(id) {
  return request({
    url: '/blog/dailyImage/' + id,
    method: 'delete'
  })
}
// 修改博客每日图片状态
export function changeDailyImageStatus(id,status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/blog/dailyImage/changeStatus',
    method: 'put',
    data: data
  })
}
// 刷新每日图片
export function refresh() {
  return request({
    url: '/blog/dailyImage/refresh',
    method: 'post',
  })
}
